package tools

import (
	"encoding/json"
	"os"
	_ "github.com/jinzhu/gorm/dialects/mysql"
)
type Environment struct {
	MysqlDns       string `json:"mysql_dsn"`
	ZincHost       string `json:"zinc_host"`
	ZincAdminName  string `json:"zinc_admin_name"`
	ZincAdminPass  string `json:"zinc_admin_pass"`
}
var env Environment
func init() {
	
	configPath := "."
	content, err := os.ReadFile(configPath + "/config.json")
	if err != nil {
		panic(err)
	}
	json.Unmarshal(content, &env)
}

func GetConfig() Environment {
	return env
}
